package com.glory.brepda.adapter;

import android.graphics.Color;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.entity.SheetInfoEntity;
import java.util.List;

public class CheckReelListAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    private PmsEqpHisListAdapter.OnClickListener mListener;

    public CheckReelListAdapter(@Nullable List<String> data) {
        super(R.layout.adapter_check_reel, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, String item) {
        helper.setText(R.id.tvCheckID,item);
        if( ! (item.trim().equals("3000") || item.trim().equals("5000"))){
            helper.setTextColor(R.id.tvCheckID, Color.rgb(255,0,0));
        }
    }

    public interface OnClickListener{
        void onCheckListener(SheetInfoEntity item);
    }

    public void setOnCheckListener(PmsEqpHisListAdapter.OnClickListener listener){
        this.mListener = listener;
    }
}
